package boot;

import pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(Task05Properties.class)
public class Task05AutoConfiguration {

    @Autowired
    private Task05Properties studentProperties;


    @Bean
    public Student student(){
        return new Student(studentProperties.getName(),studentProperties.getId());
    }
}
